import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-tabbar-buy',
  templateUrl: './tabbar-buy.component.html',
  styleUrls: ['./tabbar-buy.component.scss']
})
export class TabbarBuyComponent implements OnInit {
  public clickAdd = false;
  // tslint:disable-next-line: no-output-rename
  @Output('checked') checkedBack = new EventEmitter<any>(); //
  @Input() hadNum: any;
  constructor() { }

  ngOnInit() {
  }
  // 点击加购按钮显示加购页面
  addCart() {
    this.clickAdd = true;
    this.checkedBack.emit(this.clickAdd);
  }
}
